<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>出入库管理系统</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .header {
            background: #4285f4;
            color: white;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            flex-shrink: 0;
        }
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        .sidebar {
            width: 200px;
            background: #f1f1f1;
            overflow-y: auto;
        }
        .content {
            flex: 1;
            padding: 0;
            overflow: hidden;
        }
        .menu-item {
            padding: 15px;
            border-bottom: 1px solid #ddd;
            cursor: pointer;
        }
        .menu-item:hover {
            background: #ddd;
        }
        .logout-btn {
            color: white;
            text-decoration: none;
            line-height: 40px;
        }
        iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        .active {
            background: #ddd;
            font-weight: bold;
        }
    </style>
    <script>
        function loadPage(page) {
            document.getElementById('content-frame').src = page;
            // 更新菜单项激活状态
            const menuItems = document.querySelectorAll('.menu-item');
            menuItems.forEach(item => {
                item.classList.remove('active');
                if (item.getAttribute('onclick').includes(page)) {
                    item.classList.add('active');
                }
            });
        }
    </script>
</head>
<body>
<div class="header">
    <h2>出入库管理系统</h2>
    <a href="/logout.manager" class="logout-btn">退出登录</a>
</div>

<div class="main-container">
    <div class="sidebar">
        <div class="menu-item" onclick="loadPage('stock_in.html')">商品入库</div>
        <div class="menu-item" onclick="loadPage('stock_out.html')">商品出库</div>
        <div class="menu-item" onclick="loadPage('stock_query.html')">出入库查询</div>
        <div class="menu-item" onclick="loadPage('product_manage.html')">商品管理</div>
        <div class="menu-item active" onclick="loadPage('report.html')">库存报表</div>
    </div>

    <div class="content">
        <iframe id="content-frame" src="report.html"></iframe>
    </div>
</div>
</body>
</html>